﻿/********************************************************************************
* Author:	Christos Polydorou	(xristos.polydoroy@gmail.com)					*
* Author:	Aris Michail		(aris.michail@gmail.com)						*
* Date:		22/9/2011															*
********************************************************************************/

CREATE TABLE [dbo].[PropertyHistory]
(
	ID bigint PRIMARY KEY NOT NULL IDENTITY(1,1),
	PropertyID bigint NOT NULL,
	YearDate int,
	OfficeSupervisor nvarchar(255),
	FieldSupervisor nvarchar(255),
	agriculturist nvarchar(255),
	agriculturistApopsi nvarchar(255),
	agriculturistApopsiDate date,
	MixanimaTherismou1 nvarchar(255),
	TFMixanimatos1 nvarchar(20),
	MixanimaTherismou2 nvarchar(255),
	TFMixanimatos2 nvarchar(20),
	Production float,
	HarvestDate date,
	ProductionKindSeed nvarchar(255),
	ProductionKindMass nvarchar(255),
	ProductionQuantitySeed float,
	ProductionQuantityMass float,
	ProductionBuyPriceSeed float,
	ProductionBuyPriceMass float,
	CreatedBy nvarchar(50),
	LastUpdatedBy nvarchar(50),
	KodikosSporou nvarchar(50),
	UNIQUE (PropertyID,YearDate),
	FOREIGN KEY (PropertyID) REFERENCES Properties(ID)
)
